/*	kd:
	This is guaranteed to contain a target. It is either the position the player
	is pointing at, or the centre of a shootable, hostile actor being pointed
	at. It makes the seeking for the Rocket Revolver work a little more
	precisely. */
/*struct GcShepherd play {
	Array <Actor>    m_sheep;
	Array <float>    m_acc;
	Array <float>    m_max_speed;
	Array <bool>     m_in_3d;
	
	Actor            m_user;
	MapSpot          m_spot;
	Actor            m_target;
	
	void Init (Actor user) {
		m_user    = user;
		
		if(m_user) {
			m_spot = MapSpot(Actor.Spawn("MapSpot"));
		}
	}
	
	void Deinit () {
		if(m_spot) {
			m_spot.Destroy();
		}
	}
	
	void MakeSeeker (Actor proj, float acc, float max_speed, bool in_3d = true) {
		if(!proj) {
			return;
		}
		
		m_sheep.push(proj);
		m_acc.push(abs(acc));
		m_max_speed.push(max(0, abs(max_speed)));
		m_in_3d.push(in_3d);
	}
	
	void UnmakeSeeker (Actor proj) {
		uint size    = m_sheep.Size();
		uint handle  = m_sheep.Find(proj);
		
		if(0 < size && handle != size) {
			RemoveAtIndex(handle);
		}
	}
	
	protected void RemoveAtIndex (uint i) {
		if(i < m_sheep.Size()) {
			m_sheep.     delete(i);
			m_acc.       delete(i);
			m_max_speed. delete(i);
			m_in_3d.     delete(i);
		}
	}
	
	protected void FindTarget () {
		m_target = m_spot;
		FLineTraceData f;
		
		m_user.LineTrace(
			m_user.angle,
			32000,
			m_user.pitch,
			TRF_THRUHITSCAN,
			41,
			data: f);
		
		if(f.hittype == TRACE_HITACTOR) {
			let mo = f.hitactor;
			
			bool can_be_killed = mo.bshootable && 0 < mo.health;
			
			if(mo.bshootable && 0 < mo.health && mo.IsHostile(m_user)) {
				m_target = mo;
			}
			
			else {
				m_user.LineTrace(
					m_user.angle,
					32000,
					m_user.pitch,
					TRF_THRUHITSCAN | TRF_THRUACTORS,
					41,
					data: f);
			}
		}
			
		m_spot.SetOrigin(f.hitlocation, false);
	}
	
	vector3 TargetPos () {
		if(m_spot != m_target) {
			return m_target.pos + (0, 0, m_target.height * 0.5);
		}
		
		return m_spot.pos;
	}
	
	void TickSeeking () {
		if(!m_user) {
			return;
		}
		
		FindTarget();
		vector3 target_pos = TargetPos();
		
		if(m_target) for(uint i = m_sheep.Size(); 0 <= --i;) {
			Actor mo = m_sheep [i];
			
			if(!mo) {
				RemoveAtIndex(i);
				continue;
			}
			
			//	Slowly accelerate towards target pointer.
			let move_dir = LevelLocals.vec3diff(mo.pos, target_pos).unit();
			
			if(m_in_3d [i]) {
				mo.vel += m_acc [i] * move_dir;
			}
			
			else {
				mo.vel.x += m_acc [i] * move_dir.x;
				mo.vel.y += m_acc [i] * move_dir.y;
			}
			
			float max_speed = m_max_speed [i];
			if(max_speed < mo.vel.length()) {
				mo.vel = mo.vel.unit() * max_speed;
			}
			
			//	Make sure sprite angle is good.
			mo.angle = atan2(mo.vel.y, mo.vel.x);
		}
	}
}*/